<?php $this->load->view('sys_header');?>

<script type="text/javascript">


    function ajax_submit(){

        $.ajax({
            type:"post",
            dataType:'json',
            url:'<?php echo made_admin_url('tclass/edit?action=more');?>',
            data:$('#cpform').serialize(),
            success:function(r){
                if(r && r.success)
                {
                    $.messager.progress('close');
                    $.messager.confirm('成功提示','修改成功，返回信息列表。',function(b){
                        if(b)
                        {
                            window.location.href='<?php echo made_admin_url('tclass?tbname='.$this->tbname);?>';
                            return false; //hack ie6跳转无效
                        }

                    });
                }
                else
                {
                    lin.msg(r.msg,'error');
                }
            }
        });

    }






</script>




<div class="nav">
    <h2><a href="<?php echo made_admin_url('main/mainfra');?>">TAYCMS后台管理</a> >  <a href="<?php echo made_admin_url('tclass');?>">分类管理</a> > <a href="<?php echo made_admin_url('tclass/addtclass');?>">添加</a> </h2>
</div>



<div class="contenter">
    <div class="addpage">
    <h1></h1>
    <div class="ml"></div>

    <div id="editform">

        <form name="cpform" method="post" autocomplete="off"    id="cpform"   >

            <table  width="100%" border="0" align="left" cellpadding="0" cellspacing="0" >
                <TR>
                    <TD width="100%">

                        <table width="95%" border="0" align="center" cellpadding="3" cellspacing="0"  >


                            <tr>
                                <td>上级分类：</td>
                                <td>
                                    <input id="cc" name="bclassid" class="easyui-combotree" value="<?php echo $items['bclassid'];?>"  data-options="url:'<?php echo made_admin_url('tclass/tree_data_json?tbname='.$this->tbname)?>',required:true" style="width:150px; height: 26px;">
                                </td>
                            </tr>
<?php if ($this->tbname):?>
    <input type="hidden" name="tbname" value="<?php echo $this->tbname;?>" accesskey="">
<?php else: ?>
                            <tr>
                                <td height="30">分类类型：</td>
                                <td>
                                    <label><input type="radio" name="tbname" value="news" accept="" <?php if($items['tbname'] == 'news'):?>checked="checked"<?php endif; ?>> 文章</label>
                                    <label><input type="radio" name="tbname" value="product" accept="" <?php if($items['tbname'] == 'product'):?>checked="checked"<?php endif; ?> > 产品</label>
                                    <label><input type="radio" name="tbname" value="ad" accept="" <?php if($items['tbname'] == 'info'):?>checked="checked"<?php endif; ?> > 单页</label>
                                    <label><input type="radio" name="tbname" value="ad" accept="" <?php if($items['tbname'] == 'ad'):?>checked="checked"<?php endif; ?> > 广告</label>
                                </td>
                            </tr>

<?php endif;?>
                            <tr>
                                <td width="12%" height="30">分类名称：</td>
                                <td width="88%"><label>
                                    <input type="text" name="classname" id="classname" class="border" value="<?php echo $items['classname'];?>" size="30" />
                                </label></td>
                            </tr>

                            <tr>
                                <td height="30">分类别名：</td>
                                <td><label>
                                    <input type="text" name="bname" id="bname" size="30" class="border" value="<?php echo $items['bname'];?>" />
                                </label></td>
                            </tr>

                            <tr>
                                <td height="30">是否允许评论：</td>
                                <td>
                                    <label><input type="radio" name="checkpl" value="1" accept="" <?php if($items['checkpl'] == '1'):?>checked="checked"<?php endif; ?> > 是</label>
                                    <label><input type="radio" name="checkpl" value="0" accept="" <?php if($items['checkpl'] == '0'):?>checked="checked"<?php endif; ?> > 否</label>
                                </td>
                            </tr>

                            <tr>
                                <td height="30">是否终级栏目：</td>
                                <td>
                                    <label><input type="radio" name="islast" value="1" accept="" <?php if($items['islast'] == '1'):?>checked="checked"<?php endif; ?> > 是</label>
                                    <label><input type="radio" name="islast" value="0" accept="" <?php if($items['islast'] == '0'):?>checked="checked"<?php endif; ?> > 否</label>
                                </td>
                            </tr>

                            <tr>
                                <td height="30">排序：</td>
                                <td><label>
                                    <input type="text" name="order" id="order" size="5" class="border" value="<?php echo $items['order'];?>" />
                                </label></td>
                            </tr>

                        </table>


                    </TD>
                </TR>
                <tr>
                    <td height="30" colspan="2" align="center">
                        <br><br><input  type="hidden" name="classid" value="<?php echo $items['classid']?>" />
                        <label>
                        <input name="submit" type="button" id="submit" value="提交" onclick="ajax_submit()"   class="sub_btn" />
                    </label>
                        <label>
                            <input name="re" type="button" id="re" value="返回" onclick="window.location.href='<?php echo made_admin_url('tclass?tbname='.$this->tbname);?>'"   class="sub_btn" />
                        </label>
                    </td>
                </tr>
            </table>


        </form>


    </div>

</div>
</div>







<?php $this->load->view('sys_footer');?>